﻿<Page x:Class="WpfEffect3._5.PageEmbossBitmapEffect"
      xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
      xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
      xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
      xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
      mc:Ignorable="d" 
      d:DesignHeight="300" d:DesignWidth="800"
	Title="PageEmbossBitmapEffect">
    <Canvas>
        <Image Canvas.Left="510" Canvas.Top="10" Height="150" Name="image2" Source="images/1.png" Stretch="Fill" Width="160">
            <Image.BitmapEffect>
                <EmbossBitmapEffect x:Name="effect"  LightAngle="270" Relief="0.49"  />
            </Image.BitmapEffect>
        </Image>
        <TextBlock Canvas.Left="522" Canvas.Top="194" FontSize="40" Height="47" Name="textBlock1" Text="测试字" Width="181">
            <TextBlock.BitmapEffect><EmbossBitmapEffect  
                LightAngle="{Binding ElementName=effect, Path=LightAngle, Mode=OneWay}" 
                Relief="{Binding ElementName=effect, Path=Relief, Mode=OneWay}"  /></TextBlock.BitmapEffect></TextBlock>
        <TextBox Canvas.Left="10" Canvas.Top="194" Height="70" Name="textBox1" TextWrapping="Wrap" Width="412" />
        <TextBlock Canvas.Left="10" Canvas.Top="11" Height="21" Name="textBlock3" Text="光源方向" Width="70" />
        <Slider AutoToolTipPlacement="BottomRight" AutoToolTipPrecision="1" Canvas.Left="125" Canvas.Top="10" Height="22" Interval="10" LargeChange="10" Maximum="360" Minimum="0" Name="sldLightAngle" ToolTip="LightAngle" Value="{Binding ElementName=effect, Path=LightAngle, Mode=TwoWay}" Width="312" />
        <TextBlock Canvas.Left="10" Canvas.Top="50" Height="22" Name="textBlock4" Text="起伏的高度" Width="109" />
        <Slider AutoToolTipPlacement="BottomRight" AutoToolTipPrecision="1" Canvas.Left="125" Canvas.Top="50" Height="22" LargeChange="0.1" Maximum="1" Minimum="0" Name="sldRelief" ToolTip="Relief" Value="{Binding ElementName=effect, Path=Relief, Mode=TwoWay}" Width="312" />
    </Canvas>
</Page>
